import request from '../utils/request'

// 搜索页，获取联想建议菜单
const getSearchSuggListAPI = ({ keyword }) => request({
  method: 'GET',
  url: '/v1_0/suggestion',
  params: {
    q: keyword
  }
})

// 搜索结果
const getSearchResultListAPI = ({ keyword, page = 1 }) => request({
  method: 'GET',
  url: '/v1_0/search',
  params: {
    q: keyword,
    page
  }
})

export {
  getSearchSuggListAPI,
  getSearchResultListAPI
}
